Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLASH-332] Add backoff to getting gc safe point from pd #106

Closed
wants to merge 2 commits into from
Closed

[FLASH-332] Add backoff to getting gc safe point from pd #106

wants to merge 2 commits into from

Conversation

lidezhu
Copy link
Contributor

@lidezhu lidezhu commented Jul 16, 2019

No description provided.

@hanfei1991
Copy link
Member

It's strange, why does pd client need a tikv's backoff

@lidezhu
Copy link
Contributor Author

lidezhu commented Jul 18, 2019

It's strange, why does pd client need a tikv's backoff

Move backoff to common namespace.

@lidezhu lidezhu requested a review from hanfei1991 July 18, 2019 05:05
@hanfei1991
Copy link
Member

I don't think pd client should retry by backoff. It's unconsistent with official pd client, what do you think @ilovesoup ?

Copy link
Member

@hanfei1991 hanfei1991 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It need to be discussed, because client-c is a common module that may not only be used in flash repo

@hanfei1991
Copy link
Member

@ilovesoup @innerr In golang pd client, it returns error directy in stead of retry. I do retry only for a hot fix.

@ilovesoup
Copy link
Contributor

@ilovesoup @innerr In golang pd client, it returns error directy in stead of retry. I do retry only for a hot fix.

Yes. As far as I know, backoff and retry strategy is different for TiKV and PD. At least here we only need things for PD now. KV backoff should be added when we working on it. Otherwise the code will remain untested.

@ilovesoup
Copy link
Contributor

ilovesoup commented Jul 20, 2019

@ilovesoup @innerr In golang pd client, it returns error directy in stead of retry. I do retry only for a hot fix.

Yes we do want to keep the same behavior of client part and in near future the client might be moved out of TiFlash scope to TiKV.org. Any extra logic should be outside of client.
BTW: Would you please paste golang version url here for ease of discussion? @hanfei1991

@hanfei1991
Copy link
Member

@@ -25,6 +25,7 @@ Client::Client(const std::vector<std::string> & addrs)
pd_timeout(3),
loop_interval(100),
update_leader_interval(60),
get_gc_safe_point_timeout(20000),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the overall retry logic here? How much total retry time budget and what if still fail?

@lidezhu
Copy link
Contributor Author

lidezhu commented Aug 13, 2019

Do you mean the user of pd client should retry(using backoff strategy) when get gc safe point fail? @hanfei1991

@hanfei1991
Copy link
Member

yes, and should not use backoff.

@lidezhu
Copy link
Contributor Author

lidezhu commented Aug 13, 2019

What do you mean by "not use backoff" ? I guess it would be better to create a new issue to explain the right way to fix this problem when you have time? @hanfei1991 And how about closing this pr now? @ilovesoup

@lidezhu lidezhu closed this Aug 16, 2019
guo-shaoge pushed a commit to guo-shaoge/tiflash that referenced this pull request Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants